<template>
  <header class="ly-header">
    <div class="ly-logo">
      <img src="@/assets/images/u18.png"/>孵化器后台管理系统
    </div>
    <div class="ly-nav">
      <ul class="ly-list">
      </ul>
    </div>
    <div class="ly-user">
      <img src="../assets/images/logo.png"/>
      <!--      <img :src="userInfo.headImg"/>-->
      <h4>{{userInfo.name}}</h4>
      <p><span @click="$router.push('/logout')">退出</span></p>
    </div>
  </header>
</template>

<script>
  import {mapGetters,mapState} from 'vuex'

  export default {
    computed: {
      ...mapGetters([
        'userInfo',
      ]),
      ...mapState([
        'menu'
      ]),
    },

  }
</script>

<style scoped lang="scss">
  .ly-header {
    background: #474c5c;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 90;

    .ly-logo {
      width: 300px;
      height: 60px;
      position: absolute;
      top: 0;
      left: 0;
      line-height: 60px;
      font-size: 16px;
      color: #fff;
      font-weight: 700;

      img {
        width: 40px;
        height: 40px;
        margin: 10px;
        border-radius: 50%;
        display: inline-block;
        vertical-align: top;
      }
    }

    .ly-user {
      position: absolute;
      top: 10px;
      right: 20px;
      padding-left: 45px;
      color: #fff;

      img {
        width: 40px;
        height: 40px;
        top: 0;
        left: 0;
        position: absolute;
        border-radius: 50%;
      }

      h4 {
        line-height: 20px;
        font-size: 16px;
      }

      p {
        line-height: 20px;
        font-size: 12px;

        span {
          color: #999;
          cursor: pointer;
        }
      }
    }
  }
</style>